package com.zjh.mailbox.model.page;

import com.jfinal.kit.StrKit;
import com.jfinal.plugin.activerecord.Record;
import com.yaowk.common.model.Page;

/**
 * Created by zZz on 2017/5/30 0030.
 */
public class MailboxPage extends Page {
    private String beginTime;
    private String endTime;
    private String title;
    private String handleStatus;
    private String auditStatus;
    private String handle_user;
    private String platformId;

    public String getPlatformId() {
        return platformId;
    }

    public void setPlatformId(String platformId) {
        this.platformId = platformId;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getHandleStatus() {
        return handleStatus;
    }

    public void setHandleStatus(String handleStatus) {
        this.handleStatus = handleStatus;
    }

    public String getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    public String getHandle_user() {
        return handle_user;
    }

    public void setHandle_user(String handle_user) {
        this.handle_user = handle_user;
    }

    @Override
    public Record toRecord() {
        Record record = new Record()
                .set("beginTime", beginTime)
                .set("endTime", endTime)
                .set("handleStatus", handleStatus)
                .set("auditStatus", auditStatus)
                .set("handle_user", handle_user)
                .set("platformId",platformId);

        if (StrKit.notBlank(title)) {
            record.set("title", "%" + title + "%");
        }
        return record.removeNullValueColumns();
    }

}
